<?php 


include '../function.php';


// if(isset($_COOKIE['info'])){
// 	$arr = unserialize($_COOKIE['info']);
// 	var_dump($arr);
// }



// echo '3434';

// session_start();

// var_dump($_SESSION);











 ?>

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 <html lang="en">
 <head>
 	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
 	<title>注册</title>
 	<script type="text/javascript" src='./sns/Tpl/js/jquery.min.js'></script>
 </head>
 <body>

 	<form action="">
 		<p><input type="text" class="reg_check" name="username"><span class="notice"></span></p>
 		<p><input type="password" class="reg_check" name="password"><span class="notice"></span></p>
 		<p><input type="submit" value="注册"></p>
 	</form>


 	<script type="text/javascript">
	 	$(function  () {
	 		$('.reg_check').blur(function(event) {
	 			var value1 = $(this).val();
	 			var name1 =$(this).attr('name');
	 			var this1 = $(this);

	 			$.ajax({
	 				url: './Ajax.php',
	 				type: 'post',
	 				dataType: 'json',
	 				data: name1+"="+value1,
	 				success:function(data){
	 					if(data.error==1){
	 						this1.siblings('.notice').html('符合要求');
	 					}else{
	 						this1.siblings('.notice').html(data.info);
	 					}
	 				},
	 				error:function(data){
	 					
	 				}
	 			})
	 			
	 			
	 			


	 		});
	 	})

 	</script>
 	
 </body>
 </html>